package edu.sdbi.judge.controller;

import edu.sdbi.judge.domain.vo.StudentResult;
import edu.sdbi.judge.service.impl.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/zt")
public class TestController {
    @Autowired
    private Judge_2 judge21;
    @Autowired
    private Judge_3 judge22;
    @Autowired
    private Judge_4 judge23;
    @Autowired
    private Judge_5 judge24;
    @Autowired
    private Judge_6 judge25;

    // 修改方法名和映射路径，确保唯一性
    @GetMapping("/getJudgeIpResult")
    public StudentResult getJudgeIpResult() {
        return judge21.getJudgeIpResult("localhost:8080");
    }

    @GetMapping("/getNewsListResult")
    public StudentResult getNewsListResult() {
        return judge22.getJudgeIpResult("localhost:8080");
    }

    // 修改了方法名和映射路径
    @GetMapping("/getJudgeDetailIpResult")
    public StudentResult getJudgeDetailIpResult() {
        return judge23.getJudgeIpResult("localhost:8080");
    }

    // 可以进一步优化方法名，使其更具描述性
    @GetMapping("/getNewsAddResult")
    public StudentResult getNewsAddResult() {
        return judge24.getJudgeIpResult("localhost:8080");
    }

    @GetMapping("/getNewsUpdateResult")
    public StudentResult getNewsUpdateResult() {
        return judge25.getJudgeIpResult("localhost:8080");
    }
}